<h2>Pedidos</h2>

<table>
  <tr>
    <th>Numero</th>
    <th>Status</th>
    <th></th>
    <th></th>
  </tr>

<% @purchases.each do |purchase| %>
  <tr>
    <td><%= purchase.id %></td>
    <td><%= purchase.status.name %></td>
    <td><%= link_to 'Exibir', purchase %></td>
    <td><%= link_to 'Cancelar pedido', purchase, :confirm => 'Tem certeza?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />